﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Text;

namespace PeiYue.Model.ERPModels
{
    ///<summary>
    ///
    ///</summary>
    [SugarTable("v采购订单表体", "ERP")]
    public class ErpPurchaseOrderDetail
    {
        public ErpPurchaseOrderDetail()
        {

        }

        public int fID { get; set; }

        [SugarColumn(ColumnName = "单号")]
        public string OrderId { get; set; }

        [SugarColumn(ColumnName = "存货ID")]
        public int? CategoryId { get; set; }

        [SugarColumn(ColumnName = "大大类")]
        public string CategoryGreatlyName { get; set; }

        [SugarColumn(ColumnName = "大类")]
        public string CategoryBigName1 { get; set; }

        [SugarColumn(ColumnName = "存货编码")]
        public string SkuCode { get; set; }

        [SugarColumn(ColumnName = "品名")]
        public string SkuName { get; set; }

        [SugarColumn(ColumnName = "规格")]
        public string SkuSpec { get; set; }


        [SugarColumn(ColumnName = "报货数")]
        public decimal AnswerQty { get; set; }

        [SugarColumn(ColumnName = "收货数")]
        public decimal ReceiveQty { get; set; }

        [SugarColumn(ColumnName = "扣库数")]
        public decimal? DeductQty { get; set; }

        [SugarColumn(ColumnName = "计量单位")]
        public string StockUnit { get; set; }

        [SugarColumn(ColumnName = "单价")]
        public decimal Price { get; set; }

        [SugarColumn(ColumnName = "税率")]
        public decimal? TaxRate { get; set; }

        [SugarColumn(ColumnName = "金额")]
        public decimal Amt { get; set; }

        [SugarColumn(ColumnName = "报货金额")]
        public decimal AnswerAmt { get; set; }

        [SugarColumn(ColumnName = "收货金额")]
        public decimal? ReceiveAmt { get; set; }

        [SugarColumn(ColumnName = "采购数量")]
        public decimal PurchaseQty { get; set; }

        [SugarColumn(ColumnName = "采购计量")]
        public string PurchaseUnit { get; set; }

        [SugarColumn(ColumnName = "采购单价")]
        public decimal PurchasePrice { get; set; }

        [SugarColumn(ColumnName = "换算率")]
        public string ConversionRate { get; set; }

        [SugarColumn(ColumnName = "备注")]
        public string Remark { get; set; }

        [SugarColumn(ColumnName = "销售ID")]
        public string SaleId { get; set; }

        [SugarColumn(ColumnName = "来源")]
        public string Source { get; set; }

        [SugarColumn(ColumnName = "来源ID")]
        public string SourceId { get; set; }

        [SugarColumn(ColumnName = "制单人")]
        public string CreateUser { get; set; }

        [SugarColumn(ColumnName = "制单日期")]
        public DateTime? CreateDate { get; set; }

        [SugarColumn(ColumnName = "状态")]
        public int Status { get; set; }

        [SugarColumn(ColumnName = "客户编号")]
        public string CustomerCode { get; set; }

        [SugarColumn(ColumnName = "客户")]
        public string CustomerName { get; set; }

        [SugarColumn(ColumnName = "客户ID")]
        public int CustomerId { get; set; }

        [SugarColumn(ColumnName = "显示数量")]
        public decimal? ShowQty { get; set; }

        [SugarColumn(ColumnName = "显示金额")]
        public decimal? ShowAmt { get; set; }

        [SugarColumn(ColumnName = "报价方式")]
        public string QuotationMethod { get; set; }

        [SugarColumn(ColumnName = "订购数量")]
        public string OrderQty { get; set; }

        [SugarColumn(ColumnName = "结算数量")]
        public decimal? SettleQty { get; set; }

        [SugarColumn(ColumnName = "结算金额")]
        public decimal? SettleAmt { get; set; }

        [SugarColumn(ColumnName = "是否免税产品")]
        public string TaxFree { get; set; }

        [SugarColumn(ColumnName = "要求送货日期")]
        public string DeliveryDate { get; set; }

        [SugarColumn(ColumnName = "加工要求")]
        public string Machining { get; set; }

        [SugarColumn(ColumnName = "架号")]
        public string ShelfNumber { get; set; }

        [SugarColumn(ColumnName = "层号")]
        public string FloorNumber { get; set; }

        [SugarColumn(ColumnName = "客户优先级")]
        public string CustomerPriority { get; set; }


        [SugarColumn(IsIgnore = true)]
        public string SupplierName { get; set; }

        [SugarColumn(IsIgnore = true)]
        public string SupplierMarket { get; set; }
        /// <summary>
        /// 行号
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string LineNumber { get; set; }

        //[SugarColumn(ColumnName = "供应商编号")]
        [SugarColumn(IsIgnore = true)]
        public string SupplierCode { get; set; }

        //[SugarColumn(ColumnName = "数量")]
        [SugarColumn(IsIgnore = true)]
        public decimal Qty { get; set; }

        //称重状态 1-分拣完成; 2-缺货
        [SugarColumn(IsIgnore = true)]
        public int Flag { get; set; }

        [SugarColumn(IsIgnore = true)]
        public int PackQty { get; set; } = 1;
        [SugarColumn(IsIgnore = true)]
        public int Id { get; set; }

        [SugarColumn(IsIgnore = true)]
        public decimal ReceiptQty { get; set; }//收货数量
        [SugarColumn(IsIgnore = true)]
        public DateTime? BillDate { get; set; }//账单日期
        [SugarColumn(IsIgnore = true)]
        public string BarCode { get; set; }//条码

        [SugarColumn(IsIgnore = true)]
        public DateTime? ScanDate { get; set; }//收货日期
        /// <summary>
        /// 收货人
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string ReceiptUser { get; set; }
        /// <summary>
        /// 收货人ID
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public long UpdateUser { get; set; }

    }
}
